import java.util.Random;

/**
 * Date: 2023-04-25
 * Time: 16:52
 */
public class Test {
    static int data[][] = new int[4][4];
    public static void main(String[] args) {
        initDate();

        for (int i = 0; i < data.length; i++) {
            for (int j = 0; j < data[i].length; j++) {
                System.out.print(data[i][j]+" ");
            }
            System.out.println();
        }
    }
    private static void initDate() {
        int[] temp ={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
        Random random = new Random();
        for (int i = 0; i < temp.length; i++) {
            int index = random.nextInt(15);
            int tem = temp[i];
            temp[i] = temp[index];
            temp[index] = tem;
        }
        for (int i = 0; i < temp.length; i++) {
            data[i/4][i%4] = temp[i];
        }
    }
}
